//use serde::{Deserialize, Serialize};
//use serde_yaml;
//use std::fs::File;
//use std::collections::HashMap;
//use std::process::Command;

//mod parser;
mod utils;

mod manifest_parser;
mod command_parser;
mod command_action;
//mod command;
//use command::command_action;


fn main() -> Result<(), Box<dyn std::error::Error> > {
    println!("Hello, world!");

    //let mut contents = String::new();
    //file.read_to_string(&mut contents)?;

    let config: manifest_parser::Config = manifest_parser::manifest_parse("test.yaml")?;
    //let config: Config2 = serde_yaml::from_str(&contents)?;
    println!("config:{:?}", config);

    if utils::is_git_installed() {
        println!("Git is installed.");
    } else {
        println!("Git is not installed.");
    }

    let cli = command_parser::command_parse();

    println!("config:{:?}", cli);

    command_action::do_action(cli.command);



    Ok(())
}
